package semana1.estructurasDeControl.contadores.ejemplo03;

import java.util.Random;

public class SumaNumerosImpares {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Random r = new Random();
		int n1 = r.nextInt(50) + 1;
		int n2 = r.nextInt(50) + 1;
		int n3 = r.nextInt(50) + 1;
		int acc = 0;

		System.out.println("Numeros generados: [" + n1 + "; " + n2 + "; " + n3
				+ "]");

		if (n1 % 2 != 0) {
			acc = acc + n1;
		}
		if (n2 % 2 != 0) {
			acc = acc + n2;
		}
		if (n3 % 2 != 0) {
			acc = acc + n3;
		}

		System.out.println("La suma total de los numeros impares es: " + acc);

	}

}
